import Seo from '@/core/components/Seo'
import AppLayout from '@/core/components/layouts/AppLayout'
import BasicLayout from '@/core/components/layouts/BasicLayout'
import DesktopView from '@/core/components/views/DesktopView'
import MobileView from '@/core/components/views/MobileView'
import IsAuth from '@/lib/auth/components/IsAuth'
import InvoiceComponent from '@/lib/invoice/components/Invoice'
import { useRouter } from 'next/router'

export default function MyInvoice() {
  const router = useRouter()

  return (
    <IsAuth>
      <Seo title='Invoice - Indoteknik.com' />

      <MobileView>
        <AppLayout title='Invoice & Faktur Pajak'>
          <InvoiceComponent id={router.query.id} />
        </AppLayout>
      </MobileView>

      <DesktopView>
        <BasicLayout>
          <InvoiceComponent id={router.query.id} />
        </BasicLayout>
      </DesktopView>
    </IsAuth>
  )
}
